package com.event.pojo;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;

import java.util.Date;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;

import java.io.Serializable;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * <p>
 * 帖子
 * </p>
 *
 * @author 孤雏
 * @since 2021-08-09
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "Post对象", description = "帖子")
@JsonIgnoreProperties(ignoreUnknown = true)
public class Post implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "帖子id")
    @TableId(value = "post_id", type = IdType.ID_WORKER)
    @JsonSerialize(using = ToStringSerializer.class)
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private Long postId;

    @ApiModelProperty(value = "帖子标题")
    private String postTitle;

    @ApiModelProperty(value = "用户id")
    private Integer userId;

    @ApiModelProperty(value = "帖子内容")
    private String postContent;

    @ApiModelProperty(value = "浏览量")
    private Long postViews;

    @ApiModelProperty(value = "帖子ip")
    private String postIp;

    @ApiModelProperty(value = "评论数")
    private Long postCommentNum;

    @ApiModelProperty(value = "发帖时间")
    @TableField(fill = FieldFill.INSERT)
    private Date postTime;

    @ApiModelProperty(value = "帖子类型")
    private String postType;
    @ApiModelProperty(value = "真实姓名")
    private String realname;
    @ApiModelProperty(value = "头像url")
    private String avatar;
    @ApiModelProperty(value = "微信昵称")
    private String openname;

    @ApiModelProperty(value = "分页下标")
    private Integer idx;

    @ApiModelProperty(value = "帖子更新时间")
    @TableField(fill = FieldFill.INSERT)
    private Date postUptime;

    @ApiModelProperty(value = "帖子点赞数")
    private Long postLikeNum;

    @ApiModelProperty(value = "帖子收藏数")
    private Long postCollectNum;

}
